#include "stdafx.h"
#include "StringHelper.h"

wstring StringHelper::GetApplicationPath()
{
	//F:\WorkSpace\FileMonitor\FileMonitor\Debug\FileMonitor.exe
	return FileCommon::GetModulePath() + L"FileMonitor.exe";
}

wstring StringHelper::GetLogsDir()
{
	//F:\WorkSpace\FileMonitor\FileMonitor\Debug\logs
	return FileCommon::GetModulePath() + L"logs";
}

wstring StringHelper::GetIDNameStr(int ID, wstring name)
{
	//1_source
	return Parse::IntToWstring(ID) + L"_" + name;
}

wstring StringHelper::GetLogDir(wstring IDNameStr)
{
	//F:\WorkSpace\FileMonitor\FileMonitor\Debug\logs\3_Yellowstone
	return GetLogsDir()+ L"\\" + IDNameStr;
}

wstring StringHelper::GetLogPath(wstring IDNameStr, wstring dateStr)
{
	//F:\WorkSpace\FileMonitor\FileMonitor\Debug\logs\3_Yellowstone\20180209.log
	return GetLogsDir() + L"\\" + IDNameStr + L"\\" + dateStr + L".log";
}

wstring StringHelper::GetRootPath()
{
	//F:\WorkSpace\FileMonitor\FileMonitor\Debug
	wstring str = FileCommon::GetModulePath();
	str = str.substr(0, str.length() - 1);
	return str;
}
